import request from '@/service/request'
// 模拟请求 mock-js
/* 模拟 参数 page接口
* @param {Object} params
*  */
export const pageParamsMockApi = (params) => {
    return request.post('/mock/sys/params/page', params)
}
/* 模拟 系统字典 page接口
* @param {Object} params
*  */
export const pageParamsDictMockApi = (params) => {
    return request.post('/mock/sys/params/dict/page', params)
}
/* 系统字典 根据字典键获取list接口
*  @params {string} key 字典键
* */
export const listParamsByKeyMockApi = (key) => {
    return request.post('/mock/sys/params/dict/list', {paramKey: key})
}

/* 模拟 参数 删除
*  @param {number} id
* */
export const delParamsMockApi = (id) => {
    return request.post(`/mock/sys/params/del/${id}`)
}

/* 模拟 系统字典 删除
*  @param {number} id
* */
export const delParamsDictMockApi = (id) => {
    return request.post(`/mock/sys/params/dict/del/${id}`)
}

/* 模拟 系统字典 保存
*  @param {number} id
*  @param {string} paramsName
*  @param {string} paramsKey
*  @param {string} remarks
* */
export const saveParamsMockApi = (params) => {
    return request.post('/mock/sys/params/save', params)
}

/* 模拟 系统字典 获取角色权限列表
*  @param {number} userId 用户id 可选
*  @param {array} paramsIds 角色id 可选
* */
export const getPermissionListByParamsIdApi = (params) => {
    return request.post('/mock/sys/params/permission/list', params)
}

/* 模拟 系统字典 保存角色权限列表
*  @param {number} paramsId 角色id
*  @param {array} permissionIds 权限ids
* */
export const savePermissionListByParamsIdApi = (params) => {
    return request.post('/mock/sys/params/saveParamsPermission', params)
}
